[id].vue 647 B

123456789101112131415161718192021222324
  1. <template>
  2. <div>
  3. <h3 class="my-8">{{ $t('cycle') }}</h3>
  4. <v-card class="parameters-page-card">
  5. <UiFormEdition :model="Cycle" go-back-route="/parameters/teaching">
  6. <template #default="{ entity }">
  7. <UiInputText v-model="entity.label" field="label" :rules="rules()" />
  8. </template>
  9. </UiFormEdition>
  10. </v-card>
  11. </div>
  12. </template>
  13. <script setup lang="ts">
  14. import { useI18n } from 'vue-i18n'
  15. import Cycle from '~/models/Education/Cycle'
  16. const i18n = useI18n()
  17. const rules = () => [
  18. (label: string | null) =>
  19. (label !== null && label.length > 0) || i18n.t('please_enter_a_value'),
  20. ]
  21. </script>